import request from './request'
let baseUrl = '/fakeapi'

// 获取所有艺术品
export const getAllArtwork = ()=>{
    return  request({url:baseUrl+'/getAllArtwork', method:'get'})
}

// 获取所有上架的艺术品 假数据
export const getAllArtworkFake = (data)=>{
    return  request({url:baseUrl+'/getAllArtworkFake', method:'get', params:data})
}

// 获取用户未上架的艺术品 假数据
export const getAllSoldArtworkFake = ()=>{
    return request({url:baseUrl+'/getAllSoldArtworkFake', method:'get'})
}

// 根据id获取艺术品数据 假数据
export const getArtworkByIdFake = (id)=>{
    return request({url:baseUrl+'/getArtworkByIdFake', method:'get', params:{id}})
}

// 根据地址获取用户数据 假数据
// export const getUserByAddress = (address)=>{
//     return request({url:baseUrl+'/getUserByAddressFake', method:'get', params:{address}})
// }

// 获取Banner 假数据
export const getBannersFake = ()=>{
    return request({url:baseUrl+'/getBannersFake'})
}

// 搜索 假数据
export const getSeachArtResult = (keyword)=>{
    return request({url:baseUrl+'/search/art', params:{keyword}})
}


// // 测试接口
// async function test(){
//     let result = await getSeachArtResult('a')
//     console.log(result)
// }
// test()

export * from './user'
export * from './shops'
export * from './array'